var express = require('express');
var router = express.Router();

var data = [];

router.post('/getAppToken', function (req, res, next) {
  var email = req.param('email');
  var password = req.param('password');

  if (email === 'chokingwin@gmail.com' && password === '123456') {
    var rst = {
      code: 201,
      msg: 'success',
      data: {
        token: 'chokingwin20171229'
      }
    };
    res.json(rst);

  } else {
    var rst = {
      code: 10004,
      msg: '授权失败',
      data: ''
    };

    res.json(rst);

  }

});

module.exports = router;
